Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add -l prefix if it already exists. #59

Merged

Conversation

hgaiser
Copy link
Contributor

@hgaiser hgaiser commented Dec 17, 2018

Similarly as discussed here, a -l shouldn't be prefixed if a library already has a -l prefix. Recently (cmake 3.13) exported its dependency on pthread by adding -lpthread to ${Boost_LIBRARIES}. Using the sip_helper.py on cmake 3.13 gives the following error:

/usr/sbin/ld: cannot find -l-lpthread

Copy link
Contributor

@brawner brawner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super annoying issue, but just add a short comment echoing what you are saying in this PR.

@@ -100,7 +100,7 @@ def __init__(self):


def custom_platform_lib_function(self, clib, framework=0):
if os.path.isabs(clib):
if os.path.isabs(clib) or clib.startswith('-l'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment describing why this check is necessary and libraries that already append -l

@hgaiser
Copy link
Contributor Author

hgaiser commented Jan 2, 2019

Apologies for the delay, holidays and everything. I just pushed the requested change.

@dirk-thomas
Copy link
Contributor

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants